package cn.tedu._01mvcboot01.controller;

import dto.AddCartDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarController {
@RequestMapping("/v1/car/add")
@ResponseBody
    public String car(String brand,String license,String price){
    System.out.println("车辆信息---"+brand+":"+license+":"+price);
    return "添加成功,欢迎回来";
    }
    @Controller
    public class AddCartDTO {
        @RequestMapping("/v1/car/add2")
        @ResponseBody
        public String add2(dto.AddCartDTO addCartDTO) {
            System.out.println("addCartDTO=" + addCartDTO);

            return "添加车辆成功";
        }
    }
}
